package com.selfdriving.activity;

import java.util.Calendar;
import com.fourmob.datetimepicker.date.DatePickerDialog;
import com.fourmob.datetimepicker.date.DatePickerDialog.OnDateSetListener;
import com.selfdriving.BaseFragmentActivity;
import com.selfdriving.R;
import com.selfdriving.view.wheelview.ScreenInfo;
import com.selfdriving.view.wheelview.WheelMain;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

public class AddTravelActivity extends BaseActivity implements
		OnClickListener
{
	private Button btnNext;

	private Spinner sort_spinner;

	private Spinner age_spinner;

	// @ViewInject(id = R.id.job_spinner)
	// Spinner job_spinner;

	// @ViewInject(id = R.id.habbit_spinner)
	// Spinner habbit_spinner;

	private WheelMain wheelMain;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		View contentView = LayoutInflater.from(this.getParent()).inflate(
				R.layout.add_travel_test, null);
		setContentView(contentView);
		initView();
		String[] mItems = getResources().getStringArray(R.array.travel_sort);
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item, mItems);
		ArrayAdapter<String> adapter2 = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item, getResources()
						.getStringArray(R.array.age));
		ArrayAdapter<String> adapter3 = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item, getResources()
						.getStringArray(R.array.job));
		ArrayAdapter<String> adapter4 = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item, getResources()
						.getStringArray(R.array.habbit));
		adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		adapter3.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		adapter4.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		sort_spinner.setAdapter(adapter);
		age_spinner.setAdapter(adapter2);
		// job_spinner.setAdapter(adapter3);
		// habbit_spinner.setAdapter(adapter4);
	}

	private void initView()
	{
		btnNext = (Button) findViewById(R.id.btnNext);

		sort_spinner = (Spinner) findViewById(R.id.sort_spinner);

		age_spinner = (Spinner) findViewById(R.id.age_spinner);
		
		btnNext.setOnClickListener(this);
	}


	@Override
	public void onClick(View v)
	{
		switch (v.getId())
		{
		case R.id.btnNext:
			Intent intent = new Intent(this, AddTravelTwoActivity.class);
			startActivity(intent);
			break;

		default:
			break;
		}

	}

}
